<?php
	global $_W,$_GPC;
	if($_W['role']&&$_W['isajax']){
		$cid = $_GPC['id'];		
		if(strtotime($_GPC['starttime'])>strtotime($_GPC['endtime'])){
			exit(json_encode(array('status'=>'2','msg'=>'结束时间不能大于开始时间')));
		}
		$data = array(
			'title'=>$_GPC['title'],
			'addtime'=>$_W['timestamp'],
			'starttime'=>strtotime($_GPC['starttime']),
			'endtime'=>strtotime($_GPC['endtime']),
			'bg_color'=>$_GPC['bg_color'],
			'card_type'=>$_GPC['card_type'],
			'minus'=>$_GPC['minus'],
			'discount'=>$_GPC['discount'],
			'quantity'=>$_GPC['total_quantity'],
			'total_quantity'=>$_GPC['total_quantity'],
			'get_limit'=>$_GPC['get_limit'],
			'time_type'=>'DATE_TYPE_FIX_TIME_RANGE',
			'status'=>$_GPC['status'],
			'condition'=>$_GPC['condition'],
			'orderid'=>$_GPC['orderid']			
		);
		$up = pdo_update('mii_ang_card',$data,array('id'=>$cid,'uniacid'=>$_W['uniacid']));
		if($up){
			exit(json_encode(array('status'=>'1','msg'=>'修改成功')));
		}else{
			exit(json_encode(array('status'=>'2','msg'=>'修改失败')));
		}		
	}else{
		exit(json_encode(array('status'=>'2','msg'=>'没有操作权限')));
	}



?>